import request from '@/utils/request'

// 查询课程评价详情表列表
export function listCompassVideoEva(query) {
  return request({
    url: '/system/CompassVideoEva/list',
    method: 'get',
    params: query
  })
}

// 查询课程评价详情表详细
export function getCompassVideoEva(id) {
  return request({
    url: '/system/CompassVideoEva/' + id,
    method: 'get'
  })
}

// 新增课程评价详情表
export function addCompassVideoEva(data) {
  return request({
    url: '/system/CompassVideoEva',
    method: 'post',
    data: data
  })
}

// 精选、取消精选
export function updateChosenFlag(data) {
  return request({
    url: `/system/CompassVideoEva/updateChosenFlag/${data.id}/${data.flag}`,
    method: 'post',
    data: data
  })
}

// 修改课程评价详情表
export function updateCompassVideoEva(data) {
  return request({
    url: '/system/CompassVideoEva',
    method: 'put',
    data: data
  })
}

// 删除课程评价详情表
export function delCompassVideoEva(id) {
  return request({
    url: '/system/CompassVideoEva/' + id,
    method: 'delete'
  })
}

// 导出课程评价详情表
export function exportCompassVideoEva(query) {
  return request({
    url: '/system/CompassVideoEva/export',
    method: 'get',
    params: query
  })
}
